import Layout from '@/layout'

const courseRouter = {
  path: '/course',
  component: Layout,
  redirect: '/course/table',
  name: 'Course',
  meta: {
    title: '课程管理',
    icon: 'board'
  },
  children: [
    {
      path: 'table',
      component: () => import('@/views/course/table'),
      name: 'CourseTable',
      meta: { title: '课程列表', icon: 'book-open', noCache: false }
    },
    {
      path: 'publish',
      component: () => import('@/views/course/form'),
      name: 'CoursePublish',
      meta: { title: '发布课程', icon: 'upload-cloud', noCache: false }
    },
    {
      path: 'info/:id',
      component: () => import('@/views/course/form'),
      name: 'CourseInfoEdit',
      meta: { title: '编辑课程', noCache: false },
      hidden: true
    },
    {
      path: 'chapter/:id',
      component: () => import('@/views/course/form'),
      name: 'CourseChapterEdit',
      meta: { title: '编辑大纲', noCache: false },
      hidden: true
    }
  ]
}

export default courseRouter

